home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9104.ARJ / 9N04121A < prev    next >
Text File  |  1991-02-18  |  485b  |  19 lines

  1. mmult(aray1,aray2,aray3,row1,col1,row2,col2)
  2.  
  3. register float *aray1, *aray2, *aray3;
  4. int row1, col1, row2, col2;
  5. {
  6.      register short k, kmax, j, i;
  7.      
  8.      kmax = (col1<row2) ? col1 : row2;
  9.      for (i=0;i<row1;++i)
  10.          for (j=0;j<col2;++j)
  11.          {
  12.              aray3[i*col1+j] = 0;
  13.              for (k=0;k<kmax;++k)
  14.                 aray3[i*col1+j] += aray1[i*col1+k] *
  15.                        aray2[k*col2+j];
  16.          }             
  17.      return;
  18. }     
  19.